import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/login/Login.vue'
// import TodoList from '@/pages/todo/common-list.vue'
import CommonInfo from '@/pages/todo/common-info.vue'
import WorkSpace from '@/pages/workspace/work-space.vue'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
// const CommonList = ()=>import("@/pages/todo/common-list.vue")
export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/workspace',
      name: 'workspace',
      component: WorkSpace,
    },
    {
      path: '/commonInfo',
      name: 'commonInfo',
      component: CommonInfo
    }
  ]
})
